﻿<%@ Page Language="C#" AutoEventWireup="true"  MasterPageFile="~/Site.master" CodeBehind="FileUpload1.aspx.cs" Inherits="ColorApplication.FileUpload11" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script type="text/javascript">
        function toggleSelect1() {
            var ErrorLabel = $get('<%=ErrorLabel.ClientID%>');
            var SuccesLabel = $get('<%=SuccesLabel.ClientID %>');
            var Image1 = $get('<%=Image1.ClientID %>');
            var Panel1 = document.getElementsByName('tabDiv');
            var trBtn = $get('<%=trBtn.ClientID %>');
            var LabelImageName = $get('<%= LabelImageName.ClientID%>');
            var lblWhiteNeuMessage = $get('<%= lblWhiteNeuMessage.ClientID %>');
            var trAttributes = $get('<%= trAttributes.ClientID %>');

            var ErrorLabel2 = $get('<%=ErrorLabel2.ClientID%>');
            var SuccesLabel2 = $get('<%=SuccesLabel2.ClientID %>');
            var Image2 = $get('<%=Image2.ClientID %>');
            var trBtn2 = $get('<%=trBtn2.ClientID %>');
            var LabelImageName2 = $get('<%= LabelImageName2.ClientID%>');
            var lblWhiteNeuMessage2 = $get('<%= lblWhiteNeuMessage2.ClientID %>');

            trBtn2.style.display = 'none';
            ErrorLabel2.style.display = 'none';
            SuccesLabel2.style.display = 'none';
            Image2.style.display = 'none';
            LabelImageName2.style.display = 'none';
            lblWhiteNeuMessage2.style.display = 'none';

            trBtn.style.display = 'none';
            trAttributes.style.display = '';
            ErrorLabel.style.display = 'none';
            SuccesLabel.style.display = 'none';
            Image1.style.display = 'none';
            Panel1[0].style.display = 'none';
            Panel1[1].style.display = 'none';
            LabelImageName.style.display = 'none';
            lblWhiteNeuMessage.style.display = 'none';
        }

        function toggleSelect2() {
            var ErrorLabel = $get('<%=ErrorLabel2.ClientID%>');
            var SuccesLabel = $get('<%=SuccesLabel2.ClientID %>');
            var Image1 = $get('<%=Image2.ClientID %>');
            var Panel2 = $get('<%=Panel2.ClientID %>');
            var trBtn = $get('<%=trBtn2.ClientID %>');
            var LabelImageName = $get('<%= LabelImageName2.ClientID%>');
            var lblWhiteNeuMessage = $get('<%= lblWhiteNeuMessage2.ClientID %>');

            trBtn.style.display = 'none';
            ErrorLabel.style.display = 'none';
            SuccesLabel.style.display = 'none';
            Image1.style.display = 'none';
            Panel2.style.display = 'none';
            LabelImageName.style.display = 'none';
            lblWhiteNeuMessage.style.display = 'none';
        }
        function PreloadPage() { //DOM
            if (document.getElementById) {
                var modalPage = document.getElementById('<%= modalPage.ClientID %>');
                var FileUpload1 = document.getElementById('<%= FileUpload1.ClientID %>');
                var FileRegularExpressionValidator1 = document.getElementById('<%= FileRegularExpressionValidator1.ClientID %>');
                var CustomValidator1 = document.getElementById('<%= CustomValidator1.ClientID %>');
                
                var FileRegularExpressionValidator2 = document.getElementById('<%= FileRegularExpressionValidator2.ClientID %>');

                ValidatorEnable(FileRegularExpressionValidator1, true);
                ValidatorEnable(FileRegularExpressionValidator2, true);
                ValidatorEnable(CustomValidator1, true);

                if (modalPage != null) {
                    if (FileUpload1.value != '' && FileRegularExpressionValidator1.style.display != 'inline' && FileRegularExpressionValidator2.style.display != 'inline' && CustomValidator1.style.display != 'inline')
                        modalPage.style.visibility = 'visible';
                }

            }
        }
    </script>
    <style type="text/css">
        #tabDiv a
        {
            color: Black;
        }

        .modalPage
        {
            visibility: hidden;
        }

        .ajax__tab_default .ajax__tab_tab
        {
            color: Black;
        }

        label
        {
            font-size: 14px;
            font-weight: bold;
        }

        .grd label
        {
            display: inline-block;
            height: 100%;
            padding: 7px 0;
            width: 100%;
        }

        .waterMark
        {
            color: gray;
            font-style: italic;
            -moz-opacity: 0.8;
            opacity: 0.8;
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <img align="left" height="31" hspace="0" src="images/headerbullet.jpg" vspace="0" width="29" />
    <asp:Label ID="lblHeading" runat="server" CssClass="subheading"></asp:Label>
    <asp:Label ID="lblSelected" runat="server"
        class="bestPicture"
        Style="background: none repeat scroll 0 0 #FFEAA8; border-radius: 7px 7px 7px 7px; color: #826200; float: right; margin: 0;"
        Text="You selected these attribute families - <b><u> {0}</u></b>."
        Visible="false"></asp:Label>

    <div class="text" style="margin-top: 20px;">
        <table cellpadding="0" cellspacing="0" style="width: 100%">
            <tr>
                <td align="center" colspan="2">
                    <div id="modalPage" runat="server" class="modalPage">
                        <div class="modalBackground">
                        </div>
                        <div class="modalContainer">
                            <div class="modal">
                                <table>
                                    <tr>
                                        <td align="center">
                                            <div style="background-color: White; border: 2px solid #541C65; color: #723684; height: 47px; padding: 15px 10px 10px; text-transform: uppercase;">
                                                Please Wait...
                                            <br />
                                                <img src="Images/preloader.gif" style="margin-top: 6px;" />
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <asp:Label ID="lblPageError" runat="server" CssClass="failureNotification"></asp:Label>
                </td>
            </tr>
            <tr id="trUpload" runat="server">
                <td colspan="2" style="background-color: #f8f8f8; border: 1px solid #e6e6e6; padding: 10px 42px 0">
                    <table id="tbUploads" runat="server" style="width: 100%">
                        <tr>
                            <td style="vertical-align: top; width: 50%;">
                                <table id="tbFileupload1" runat="server" width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <label>
                                                <asp:Literal ID="litFirstImg" runat="server" Text="First Image:"></asp:Literal>
                                            </label>
                                            <p>
                                                <asp:Label ID="ErrorLabel" runat="server" CssClass="failureNotification"></asp:Label>
                                                <asp:Label ID="SuccesLabel" runat="server" CssClass="successNotification"></asp:Label>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <asp:FileUpload ID="FileUpload1" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:RegularExpressionValidator ID="FileRegularExpressionValidator1"
                                                runat="server" ControlToValidate="FileUpload1" CssClass="failureNotification"
                                                Display="Dynamic" ErrorMessage="Invalid Image File." ValidationExpression="(.*?)\.(jpg|jpeg|png|gif|bmp|JPG|JPEG|PNG|GIF|BMP)$"
                                                ValidationGroup="mygroup"> </asp:RegularExpressionValidator>
                                            <div style="margin-right: -335px; text-align: right;">
                                                <asp:CustomValidator ID="CustomValidator1" runat="server"
                                                    ControlToValidate="FileUpload1" CssClass="failureNotification" Display="Dynamic"
                                                    ValidateEmptyText="True"
                                                    ValidationGroup="mygroup" Enabled="false"></asp:CustomValidator>
                                                <asp:CustomValidator ID="CustomValidator2" Enabled="false" runat="server"
                                                    ClientValidationFunction="validateRequired"
                                                    ControlToValidate="FileUpload1" CssClass="failureNotification"
                                                    Display="Dynamic"
                                                    ErrorMessage="A File is Required."
                                                    Style="margin-right: 170px;"
                                                    ValidateEmptyText="True"
                                                    ValidationGroup="mygroup"></asp:CustomValidator>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td style="vertical-align: top; width: 50%;">
                                <table id="tbFileupload2" runat="server" style="float: right;" width="100%">
                                    <tr>
                                        <td>
                                            <label>Second Image:</label>
                                            <p>
                                                <asp:Label ID="ErrorLabel2" runat="server" CssClass="failureNotification"></asp:Label>
                                                <asp:Label ID="SuccesLabel2" runat="server" CssClass="successNotification"></asp:Label>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <asp:FileUpload ID="FileUpload2" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:RegularExpressionValidator ID="FileRegularExpressionValidator2"
                                                runat="server" ControlToValidate="FileUpload2" CssClass="failureNotification"
                                                Display="Dynamic" ErrorMessage="Invalid Image File." ValidationExpression="(.*?)\.(jpg|jpeg|png|gif|bmp|JPG|JPEG|PNG|GIF|BMP)$"
                                                ValidationGroup="mygroup"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right;">&nbsp;</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td id="TDForResultSaveButton" runat="server" align="center" colspan="2" style="vertical-align: top;">
                                <asp:Button ID="SaveButton" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="SaveButton_Click" OnClientClick="document.getElementById('form1').target ='_self';"
                                    Text="Show Results" ValidationGroup="mygroup" />
                            </td>
                        </tr>
                    </table>
                    <table id="tbUrl" runat="server" style="width: 100%">
                        <tr>
                            <td style="padding-bottom: 11px">
                                <asp:Panel runat="server" DefaultButton="SaveButton1">
                                    <asp:TextBox ID="txtUrl" runat="server" Style="width: 300px; margin-right: 40px;">
                                    </asp:TextBox>
                                    <asp:TextBoxWatermarkExtender
                                        ID="txtUrl_TextBoxWatermarkExtender"
                                        runat="server" Enabled="True" TargetControlID="txtUrl"
                                        WatermarkCssClass="waterMark"
                                        WatermarkText="Enter web site URL eg. http://www.colorsay.com">
                                    </asp:TextBoxWatermarkExtender>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                        runat="server"
                                        ControlToValidate="txtUrl" CssClass="failureNotification"
                                        Display="Dynamic"
                                        ErrorMessage="Required"
                                        ValidationGroup="urlgroup">
                                    </asp:RequiredFieldValidator>
                                    <asp:Button ID="SaveButton1" runat="server"
                                        CssClass="btnShow bigFont" OnClick="SaveButton1_Click" OnClientClick="document.getElementById('form1').target ='_self';"
                                        Text="Show Results" ValidationGroup="urlgroup" />
                                </asp:Panel>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr id="trAfterUpload" runat="server" style="display: none;">
                <td colspan="2">
                    <asp:Panel ID="pnlImg1" runat="server" CssClass="divImg1MainSingle bigFont">
                        <p class="p headMsg ">
                            <asp:Label ID="LabelImageName" runat="server" Style="text-transform: uppercase; word-break: break-all;"></asp:Label>
                        </p>
                        <div id="divImgMain1" runat="server" class="imgMainDivSingle">
                            <div id="divImg1" runat="server" class="imgImgDivSingle">
                                <asp:Image ID="Image1" runat="server" CssClass="imgImg" />
                            </div>
                            <div id="divImgSize1" runat="server" class="imgImgSizeSingle">
                                <label>Image size:</label>
                                &nbsp;<label id="lblImgSize1" runat="server">256 kb</label>
                            </div>
                            <div id="trBtn" runat="server" class="imgBtnDivSingle">
                                <asp:Button ID="DownloadButton" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="DownloadButton_Click"
                                    OnClientClick="document.getElementById('form1').target ='_self';"
                                    Style="float: left;" Text="Download XLS" />
                                <asp:Button ID="WebFileButton" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="WebFileButton_Click"
                                    OnClientClick="document.getElementById('form1').target ='_self';"
                                    Text="Download Web File" />
                                <asp:Button ID="ViewHtmlButton" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="ViewHtmlButton_Click"
                                    OnClientClick="document.getElementById('form1').target ='_blank';"
                                    Text="View HTML" />
                            </div>
                            <div id="divContribute1" runat="server" style="float: left;">
                                <asp:Label ID="lblContributeColor1"
                                    runat="server"
                                    Text="The color which contributed most to good direction is {0}"></asp:Label>
                                <asp:Label ID="lblWhiteNeuMessage" runat="server"
                                    Style="display: none;"
                                    Text="White color neutralization is not activated."></asp:Label>
                            </div>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="pnlImg2" runat="server" CssClass="divImg1MainSingle bigFont">
                        <p class="p headMsg ">
                            <asp:Label ID="LabelImageName2" runat="server" Style="text-transform: uppercase;"></asp:Label>
                        </p>
                        <div id="divImgMain2" runat="server" class="imgMainDivSingle">
                            <div id="divImg2" runat="server" class="imgImgDivSingle">
                                <asp:Image ID="Image2" runat="server" CssClass="imgImg" />
                            </div>
                            <div id="divImgSize2" runat="server" class="imgImgSizeSingle">
                                <label>Image size: </label>
                                &nbsp;<label id="lblImgSize2" runat="server">256 kb</label>
                            </div>
                            <div id="trBtn2" runat="server" class="imgBtnDivSingle">
                                <asp:Button ID="DownloadButton2" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="DownloadButton2_Click"
                                    OnClientClick="document.getElementById('form1').target ='_self';"
                                    Style="float: left;" Text="Download XLS" />
                                <asp:Button ID="WebFileButton2" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="WebFileButton2_Click"
                                    OnClientClick="document.getElementById('form1').target ='_self';"
                                    Text="Download Web File" />
                                <asp:Button ID="ViewHtmlButton2" runat="server"
                                    CssClass="btnShow bigFont"
                                    OnClick="ViewHtmlButton2_Click"
                                    OnClientClick="document.getElementById('form1').target ='_blank';"
                                    Text="View HTML" />
                            </div>
                            <div id="divContribute2" runat="server" style="float: left;">
                                <asp:Label ID="lblContributeColor2"
                                    runat="server"
                                    Text="The color which contributed most to good direction is {0}"></asp:Label>
                                <asp:Label ID="lblWhiteNeuMessage2" runat="server"
                                    Style="display: none;"
                                    Text="White color neutralization is not activated."></asp:Label>
                            </div>
                        </div>

                    </asp:Panel>

                </td>
            </tr>
            <tr id="trAttributes" runat="server" style="display: none;">
                <td colspan="2" style="padding: 20px 0;">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td align="center">
                                <p class="p headMsg bigFont">
                                    Please choose up to four desired attributes, and mention if should appear or must
                                    appear.
                                </p>
                                <p class="p pHead bigFont">
                                    Attribute Family
                                </p>
                                <asp:GridView ID="grdVwAttribute" runat="server" AutoGenerateColumns="False"
                                    CellPadding="4" CssClass="bigFont grd"
                                    DataKeyNames="Id"
                                    DataSourceID="AttributeFamiliesGridSqlDataSource"
                                    ForeColor="#333333" GridLines="None" ShowHeader="False"
                                    Width="100%">
                                    <Columns>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chk" runat="server" />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" Width="5%" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True"
                                            SortExpression="Id" Visible="False" />
                                        <asp:TemplateField HeaderText="Attribute Family" SortExpression="description">
                                            <ItemTemplate>
                                                <asp:Label ID="lblAttributeFamily" runat="server"
                                                    AssociatedControlID="chk"
                                                    Text='<%# Bind("Description") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="50%" />
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:DropDownList ID="ddlAppearance" runat="server" Style="background-color: #E1E1E1; border: 1px solid #B6B6B6; width: 90%;">
                                                    <asp:ListItem Text="should appear" Value="1">
                                                    </asp:ListItem>
                                                    <asp:ListItem Text="important to appear" Value="2">
                                                    </asp:ListItem>
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="45%" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <RowStyle BackColor="#EEEEEE" Height="40px" VerticalAlign="Top" />
                                    <AlternatingRowStyle BackColor="#F8F8F8" Height="40px" />
                                </asp:GridView>
                                <asp:SqlDataSource ID="AttributeFamiliesGridSqlDataSource" runat="server"
                                    CancelSelectOnNullParameter="False"
                                    ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
                                    SelectCommand="GetSearchByAttributesfamiliesSelect" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">

                    <asp:Label ID="BestPicture0" runat="server" class="bestPicture" Text="Picture {0} is better."
                        Visible="false"></asp:Label>

                </td>
            </tr>
            <tr>
                <td colspan="2" style="vertical-align: top; padding-top: 20px;">
                    <asp:Panel ID="Panel1" runat="server" Style="float: left; overflow: auto; width: 100%;">
                        <div id="tabDiv" name="tabDiv">
                            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="4"
                                CssClass="Tab" Style=""
                                Width="100%">
                                <asp:TabPanel ID="CSVTabPanel" runat="server" ForeColor="Black" HeaderText="CSV File">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ShowFileGridView" runat="server" AllowSorting="True"
                                                AutoGenerateColumns="False"
                                                OnSorting="ShowFileGridView_Sorting">
                                                <Columns>
                                                    <asp:BoundField DataField="Sub-color name" HeaderText="Sub-color name" ReadOnly="True"
                                                        SortExpression="Sub-color name" />
                                                    <asp:BoundField DataField="R value" HeaderText="R value" ReadOnly="True" SortExpression="R value" />
                                                    <asp:BoundField DataField="G value" HeaderText="G value" ReadOnly="True" SortExpression="G value" />
                                                    <asp:BoundField DataField="B value" HeaderText="B value" ReadOnly="True" SortExpression="B value" />
                                                    <asp:BoundField DataField="Pixels amount" HeaderText="Pixels amount" ReadOnly="True"
                                                        SortExpression="Pixels amount" />
                                                    <asp:BoundField DataField="Pixels pecentage" HeaderText="Pixels pecentage" ReadOnly="True"
                                                        SortExpression="Pixels pecentage" />
                                                    <asp:BoundField DataField="Column 11" HeaderText="Brightness" ReadOnly="True" SortExpression="Column 11" />
                                                </Columns>
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="ColorTabPanel" runat="server" HeaderText="Color Details" Visible="False">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ColorGridView" runat="server" AllowSorting="True"
                                                AutoGenerateColumns="False"
                                                OnSorting="ColorGridView_Sorting"
                                                Width="100%">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Color" SortExpression="Color">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblColor" runat="server" Text='<%# Bind("Color") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Percentage" SortExpression="Percentage">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblPercentage" runat="server" Text='<%# Bind("Percentage") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                            <asp:Label ID="LabelContributedColor" runat="server"><font style="color: red; font-weight: bold;">*</font> : The color which contributed most to good direction.</asp:Label>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="SubColorTabPanel" runat="server" HeaderText="Sub-Color
                        Details" Visible="False">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="SubColorDeatilsGridView" runat="server" AllowSorting="true"
                                                OnSorting="SubColorDeatilsGridView_Sorting"
                                                Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="ColorBrightnessTabPanel" runat="server" HeaderText="Color Brightness" Visible="False">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ColorBrightNessGridView" runat="server" AllowSorting="true"
                                                OnSorting="ColorBrightNessGridView_Sorting"
                                                Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="ColorAttributeTabPanel" runat="server" HeaderText="Attribute
                        Details" Visible="false">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ColorAttributeGridView" runat="server" AllowSorting="true"
                                                OnSorting="ColorAttributeGridView_Sorting"
                                                Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="AttributeFamiliesPanel" runat="server" HeaderText="Attribute Families Details">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:Repeater ID="AttributeFamiliesGridView" runat="server" OnItemDataBound="AttributeFamiliesGridView_ItemDataBound">
                                                <HeaderTemplate>
                                                    <table cellpadding="0" cellspacing="0" style="width: 100%; font-family: Arial;">
                                                   
                                                        <tr>
                                                            <th class="th thStart">Attribute Families </th>
                                                            <th class="th thMiddle">Attribute </th>
                                                            <th id="AttributeCountHeader" runat="server" class="th thMiddle">Count </th>
                                                            <th id="AttributePercentageHeader" runat="server" class="th thMiddle">Percentage
                                                            </th>
                                                            <th class="th thEnd">Weighted (%)
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td align="left"
                                                                colspan="5"
                                                                style="background-color: #DFEBF7; color: #118BCB; font-size: 13px; font-weight: bold; padding: 5px;">Most Dominant Types </td>
                                                        </tr>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <tr class="trItem">
                                                        <td class="tdStart">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute Families")%>
                                                        </td>
                                                        <td class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute")%>
                                                        </td>
                                                        <td
                                                            id="AttributeCount" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Count")%>
                                                        </td>
                                                        <td
                                                            id="AttributePercentage" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Percentage")%>
                                                        </td>
                                                        <td class="tdEnd">
                                                            <%#DataBinder.Eval(Container.DataItem, "WeightedPercentage")%>
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace1" runat="server" visible="False">
                                                        <td id="Td1"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace2" runat="server" visible="False">
                                                        <td id="Td2"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <tr class="trAlterItem">
                                                        <td class="tdStart">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute Families")%>
                                                        </td>
                                                        <td class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute")%>
                                                        </td>
                                                        <td
                                                            id="AttributeCount" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Count")%>
                                                        </td>
                                                        <td
                                                            id="AttributePercentage" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Percentage")%>
                                                        </td>
                                                        <td class="tdEnd">
                                                            <%#DataBinder.Eval(Container.DataItem, "WeightedPercentage")%>
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace1" runat="server" visible="False">
                                                        <td id="Td1"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace2" runat="server" visible="False">
                                                        <td id="Td2"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </AlternatingItemTemplate>
                                                <FooterTemplate>
                                                    </table>
                                                </FooterTemplate>
                                            </asp:Repeater>
                                            <asp:Label ID="lblWantedFamilyMark" runat="server"></asp:Label>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="WhiteColorNeutralizationPanel" runat="server" HeaderText="White Color Neutralization"
                                    Visible="false">
                                    <HeaderTemplate>
                                        White Color Neutralization
                                    </HeaderTemplate>
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="WhiteColorNeutralizationGridView" runat="server" Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="BrightnessLevelPanel" runat="server" HeaderText="Brightness Level"
                                    Visible="false">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="BrightnesLevelGridView" runat="server" Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="Panel2" runat="server" Style="float: left; overflow: auto; width: 100%;">
                        <div id="Div1" name="tabDiv">
                            <asp:TabContainer ID="TabContainer2" runat="server" ActiveTabIndex="0"
                                CssClass="Tab" Style=""
                                Width="100%">
                                <asp:TabPanel ID="CSVTabPanel2" runat="server" ForeColor="Black" HeaderText="CSV File">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ShowFileGridView2" runat="server" AllowSorting="True"
                                                AutoGenerateColumns="False"
                                                OnSorting="ShowFileGridView2_Sorting">
                                                <Columns>
                                                    <asp:BoundField DataField="Sub-color name" HeaderText="Sub-color name" ReadOnly="True"
                                                        SortExpression="Sub-color name" />
                                                    <asp:BoundField DataField="R value" HeaderText="R value" ReadOnly="True" SortExpression="R value" />
                                                    <asp:BoundField DataField="G value" HeaderText="G value" ReadOnly="True" SortExpression="G value" />
                                                    <asp:BoundField DataField="B value" HeaderText="B value" ReadOnly="True" SortExpression="B value" />
                                                    <asp:BoundField DataField="Pixels amount" HeaderText="Pixels amount" ReadOnly="True"
                                                        SortExpression="Pixels amount" />
                                                    <asp:BoundField DataField="Pixels pecentage" HeaderText="Pixels pecentage" ReadOnly="True"
                                                        SortExpression="Pixels pecentage" />
                                                    <asp:BoundField DataField="Column 11" HeaderText="Brightness" ReadOnly="True" SortExpression="Column 11" />
                                                </Columns>
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="ColorTabPanel2" runat="server" HeaderText="Color Details" Visible="False">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ColorGridView2" runat="server" AllowSorting="True"
                                                AutoGenerateColumns="False" OnSorting="ColorGridView2_Sorting"
                                                Width="100%">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Color" SortExpression="Color">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblColor" runat="server" Text='<%# Bind("Color") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Percentage" SortExpression="Percentage">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblPercentage" runat="server" Text='<%# Bind("Percentage") %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                            <asp:Label ID="LabelContributedColor2" runat="server"><font style="color: red; font-weight: bold;">*</font> : The color which contributed most to good direction.</asp:Label>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="SubColorTabPanel2" runat="server" HeaderText="Sub-Color
                        Details" Visible="False">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="SubColorDeatilsGridView2" runat="server" AllowSorting="true"
                                                OnSorting="SubColorDeatilsGridView2_Sorting"
                                                Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="ColorBrightnessTabPanel2" runat="server" HeaderText="Color Brightness" Visible="False">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ColorBrightNessGridView2" runat="server" AllowSorting="true"
                                                OnSorting="ColorBrightNessGridView2_Sorting"
                                                Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="ColorAttributeTabPanel2" runat="server" HeaderText="Attribute
                        Details" Visible="false">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="ColorAttributeGridView2" runat="server" AllowSorting="true"
                                                OnSorting="ColorAttributeGridView2_Sorting"
                                                Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="AttributeFamiliesPanel2" runat="server" HeaderText="Attribute
                        Families Details">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:Repeater ID="AttributeFamiliesGridView2" runat="server" OnItemDataBound="AttributeFamiliesGridView2_ItemDataBound">
                                                <HeaderTemplate>
                                                    <table cellpadding="0" cellspacing="0" style="width: 100%; font-family: Arial;">
                                                    </table>
                                                        <tr>
                                                            <th class="th thStart">Attribute Families </th>
                                                            <th class="th thMiddle">Attribute </th>
                                                            <th id="AttributeCountHeader" runat="server" class="th thMiddle">Count </th>
                                                            <th id="AttributePercentageHeader" runat="server" class="th thMiddle">Percentage
                                                            </th>
                                                            <th class="th thEnd">Weighted (%)
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td align="left"
                                                                colspan="5"
                                                                style="background-color: #DFEBF7; color: #118BCB; font-size: 13px; font-weight: bold; padding: 5px;">Most Dominant Types </td>
                                                        </tr>
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <tr class="trItem">
                                                        <td class="tdStart">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute Families")%>
                                                        </td>
                                                        <td class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute")%>
                                                        </td>
                                                        <td
                                                            id="AttributeCount" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Count")%>
                                                        </td>
                                                        <td
                                                            id="AttributePercentage" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Percentage")%>
                                                        </td>
                                                        <td class="tdEnd">
                                                            <%#DataBinder.Eval(Container.DataItem, "WeightedPercentage")%>
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace1" runat="server" visible="False">
                                                        <td id="Td1"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace2" runat="server" visible="False">
                                                        <td id="Td2"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                                <AlternatingItemTemplate>
                                                    <tr class="trAlterItem">
                                                        <td class="tdStart">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute Families")%>
                                                        </td>
                                                        <td class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Attribute")%>
                                                        </td>
                                                        <td
                                                            id="AttributeCount" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Count")%>
                                                        </td>
                                                        <td
                                                            id="AttributePercentage" runat="server"
                                                            class="tdMiddle">
                                                            <%#DataBinder.Eval(Container.DataItem, "Percentage")%>
                                                        </td>
                                                        <td class="tdEnd">
                                                            <%#DataBinder.Eval(Container.DataItem, "WeightedPercentage")%>
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace1" runat="server" visible="False">
                                                        <td id="Td1"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                    <tr id="trSpace2" runat="server" visible="False">
                                                        <td id="Td2"
                                                            runat="server"
                                                            class="tdSpace" colspan="5">
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </AlternatingItemTemplate>
                                                <FooterTemplate></table></FooterTemplate>
                                            </asp:Repeater>
                                            <asp:Label ID="lblWantedFamilyMark2" runat="server"></asp:Label>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="WhiteColorNeutralizationPanel2" runat="server" HeaderText="White Color Neutralization"
                                    Visible="false">
                                    <HeaderTemplate>White Color Neutralization</HeaderTemplate>
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="WhiteColorNeutralizationGridView2" runat="server" Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel ID="BrightnessLevelPanel2" runat="server" HeaderText="Brightness Level"
                                    Visible="false">
                                    <ContentTemplate>
                                        <div style="overflow: auto; color: Black;">
                                            <asp:GridView ID="BrightnesLevelGridView2" runat="server" Width="100%">
                                                <HeaderStyle Font-Bold="False" ForeColor="Black" />
                                            </asp:GridView>
                                        </div>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </div>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="vertical-align: top; padding-top: 20px;">
                    <asp:Panel ID="pnlPieImg1" runat="server" Style="text-align: center; padding: 10px 0; display: none;">
                        <asp:Image ID="imgPieChart1" runat="server" alt="Pie Chart" />
                    </asp:Panel>
                    <asp:Panel ID="pnlPieImg2" runat="server" Style="text-align: center; padding: 10px 0; display: none;">
                        <asp:Image ID="imgPieChart2" runat="server" alt="Pie Chart" />
                    </asp:Panel>
                    <asp:Button ID="btnViewDetail" runat="server"
                        CssClass="btnShow bigFont"
                        OnClick="btnViewDetail_Click"
                        Style="float: right;"
                        Text="View Detail"
                        Visible="false" />
                    <div style="clear: both; font-size: 16px; font-weight: bolder; text-align: center;">
                        <asp:Label ID="lblCommonMessage" runat="server"></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                    <asp:Label ID="BestPicture" runat="server" class="bestPicture" Text="Picture {0} is better."
                        Visible="false"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

